<template>
    <el-container>
    <el-main>
      <div>
<el-table
    :data="managedInfor"
    style="width: 100%"
     max-height="600">
    <el-table-column
      prop="realname"
      label="姓名"
      width="150">
    </el-table-column>
    <el-table-column
      prop="telephone"
      label="电话"
      width="200">
    </el-table-column>
    <el-table-column
      prop="telephone"
      label="职位"
      width="200">
    </el-table-column>
    <el-table-column
      prop="telephone"
      label="年薪(万)"
      width="150">
    </el-table-column>
     <el-table-column
      width="300"
      align="right">
      <template #header>
        <el-input
          v-model="manageSearchName"
          size="mini"
          @keydown.enter="manageSearchSubmit"
          placeholder="输入关键字搜索"/>
      </template>
      <template #default="scope">
        <el-button
          size="mini"
          @click="handleCheck(scope.$index, scope.row)">查看</el-button>
        <el-button
          size="mini"
          @click="handleChange(scope.$index, scope.row)">修改</el-button>
          <el-button
          size="mini"
          type="danger"
          @click="handleLeave(scope.$index, scope.row)">离职</el-button>
      </template>
    </el-table-column>
  </el-table>
</div>
    </el-main>
  </el-container>
    <!--<div>
      <el-input v-model="manageSearchName" placeholder="请输入员工姓名或者电话" style="width: 30%;"></el-input>
      <el-button type="primary" @click="manageSearchSubmit">搜索</el-button>
    </div>-->
</template>

<script>
export default {
    name:"manage",
    data(){
      return{
        manageSearchName:"",
        managedInfor:[],
      }
      
    },
    methods:{
          manageSearchSubmit:function() {//在管理页面下的搜索员工按钮功能函数
            this.$axios.get("#?name="+this.manageSearchName)
            .then(function(response){
                console.log(response.data);
            },function(err){
                alert("搜索员工失败")
            }
            )
			      console.log(this.manageSearchName);
          }
    }
}
</script>

<style >

</style>
